1. Field of the Invention
The present invention relates to an information processing apparatus such as a cellular phone connectable to an external device via a short distance wireless link. In particular, the invention relates to an information processing apparatus which can control a connection with the external device and commands to be handled by the protocol layer.
2. Description of the Related Art
In recent years, as a wireless communication technology which can be applied to electronic devices and the like, for example, the Bluetooth standard has been known. When this wireless communication technology according to the Bluetooth is utilized, audio data can be transferred from a cellular phone to an external device such as a head set, for example, without using an audio cable.
As standards of this Bluetooth, Bluetooth Specification version 1.2 (Bluetooth SIG) which is a specification provided with interference measures against a wireless LAN of 2.4 GHz (IEEE 802.11/b/g), Bluetooth Specification version 2+EDR (Bluetooth SIG) which is a specification adopting EDR (Enhanced Data Rate) of a higher speed function, and the like are known.
Incidentally, in a case where, while a disconnection processing of the wireless link is executed between the cellular phone and the head set, a new connection request is issued from a higher level layer, if a connection processing based on the connection request is executed, the disconnection processing which is already in execution collides with the connection processing. Thus, the connection processing may fail to be appropriately executed. On the other hand, in a case where a connection based on a physical layer remains, by utilizing this connection, a connection based on a logical layer can be established and kinds of commands are transferred via the logical connection. Here, in a case that a plurality of commands is issued while a processing is executed, the pluralities of commands are stored in a queue buffer, e.g. a FIFO buffer. However, if one of the pluralities of commands is for canceling the processing already executed on the basis of the previous command, the canceling processing may be delayed.
In this way, there is a problem that it is difficult to appropriately execute the processing based on the command.
On the other hand, for example, as an electric field intensity between the cellular phone and the head set is decreased, a response with respect to the connection request transmitted from the cellular phone to the head set may not be easily received in some cases (that is, in usual cases, the response can be received in one second, but it takes two to three seconds to receive the response). For example, an authentication using a PIN code, which is inputted by a user, is carried out when a connection is established with the head set. However, under the weak electric field condition between the cellular phone and the head set, this authentication processing cannot be smoothly performed and sometimes may stand by until the authentication processing is completed. In such a case, even when a disconnection request is desired to be carried out from the cellular phone, there is a problem that the connection between the two devices cannot be disconnected immediately.
In particular, in the case of the cellular phone, there is a problem that a user may have an inconvenience in operating the cellular phone, if the connection between the cellular phone and the head set cannot be disconnected immediately when an incoming call is received at the cellular phone.